import { Observer } from "mobx-vue"
import { Component, Vue } from "vue-property-decorator";
import { addUser } from 'src/utils/axios'
import PubArea from 'src/views/components/pubArea/pubArea.vue';
@Observer
@Component({
  props: {
    clear: {
      type: Boolean,
      default: false
    }
  },
  components: {
    PubArea
  }
})
export default class MemberAdd extends Vue {
    isShowModel: boolean = false;
    formItem:any={
      username:"",
      truename:"",
      password:""
    }
    mounted() {
      let vm: any = this;
      vm.isShowModel = true;
      // vm.getDepartment();
    }
    //关闭
  close() {
    let vm: any = this;
    let xwindow: any = window
    vm.isShowModel = false;
    if (!vm.clear) {
      xwindow.clearBodyStyle()
    }
    vm.$emit('close')
  }
  //确定
  async confirm() {
    let vm: any = this;
    let areaParams=vm.$refs.area.formInline;
    let param={district_code: "330411000000",...vm.formItem,...areaParams}
    let out:any=await addUser(param);
    console.log(out)
  }

}